package com.stormrage.entity.ent.rep;

import java.io.Serializable;

import com.stormrage.entity.ent.EntEnterprise;

public class EntEnterpriseRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 1884917528858145555L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;

	private String enterprise;

	private String phone;

	private String email;

	private String upload;

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(String enterprise) {
		this.enterprise = enterprise;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getUpload() {
		return upload;
	}

	public void setUpload(String upload) {
		this.upload = upload;
	}

	// ------------------------------- Fields -------------------------------

	public static EntEnterpriseRep instance(EntEnterprise arg0, Integer seq, Integer upload) {
		EntEnterpriseRep entity = new EntEnterpriseRep();
		entity.setSeq(seq);
		entity.setId(arg0.getId());
		entity.setEnterprise(arg0.getEnterprise());
		entity.setPhone(null == arg0.getPhone() ? "暂无" : arg0.getPhone());
		entity.setEmail(null == arg0.getEmail() ? "暂无" : arg0.getEmail());
		if (upload.equals(0))
			entity.setUpload("可上传");
		if (upload.equals(1))
			entity.setUpload("不可上传");
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : seq - " + seq + " id - " + id + " enterprise - " + enterprise;
	}

}
